<template>
  <el-row>
    <el-col :span="22" :offset="1">

      <!--卡片shart-->
      <el-card class="box-card" style="padding: 0 15px;">

        <el-row style="width:100%;line-height:40px;margin-top:30px;border: 1px solid white">
          <el-col :span="2" :offset="0" style="margin-left:20px;">
            <span style="font-size: 15px;margin-right: 5px;">查询药品</span>
          </el-col>
          <!--查询框-->
          <el-col :span="7" :offset="0" style="margin-left:20px;">
            <el-input placeholder="输入药品名称" v-model="searchValue" class="input-with-select">
              <el-button slot="append" icon="el-icon-search" @click="querySubmit"></el-button>
            </el-input>
          </el-col>
          <el-col :span="2" :offset="9" style="height:40px;line-height:40px;">
            <el-button type="success" @click="addFun">确定添加药品</el-button>
          </el-col>
          <el-col :span="2" :offset="1" style="height:40px;line-height:40px;">
            <el-button type="success" @click="goback">返回</el-button>
          </el-col>
        </el-row>

        <el-row :gutter="0" style="margin-top:20px;border: 1px solid white">
          <el-col :span="24" :offset="0" >
            <el-table stripe :data="tableData1" :header-cell-style="{lineHeight:'20px'}" style="width: 100%"><!--height="840"-->
              <el-table-column fixed prop="prop0" label="序号"></el-table-column>
              <el-table-column prop="prop1" label="工号"></el-table-column>
              <el-table-column prop="prop2" label="员工姓名"></el-table-column>
              <el-table-column prop="prop3" label="员工性别"></el-table-column>
              <el-table-column prop="prop4" label="员工年龄"></el-table-column>
              <el-table-column prop="prop5" label="手机号码"></el-table-column>
              <el-table-column prop="prop6" label="所属科室"></el-table-column>
              <el-table-column prop="prop7" label="角色"></el-table-column>
              <el-table-column prop="prop8" label="创建时间"></el-table-column>
              <el-table-column prop="prop9" label="创建人员"></el-table-column>
              <el-table-column fixed="right" label="操作" width="150">
                <template slot-scope="scope">
                  <el-button type="text" size="small">编辑</el-button>
                  <el-button type="text" size="small" @click="handleClick(scope.row)">删除</el-button>
                </template>
              </el-table-column>
            </el-table>

          </el-col>
        </el-row>

      </el-card>
      <!--卡片end-->

    </el-col>
  </el-row>
</template>

<script>
    export default {
        name: "recipeInsert",
      data() {
        const item = {
          prop0: 1,
          prop1: '201912090030',
          prop2: '王小虎',
          prop3: '男',
          prop4: 20,
          prop5: '15809290122',
          prop6: '全科',
          prop7: '医生',
          prop8: '2019-11-12 12:08:12',
          prop9: '王冕',
        };
        return {
          tableData1: Array(7).fill(item),
        }
      },
      methods: {
        handleClick(row) {
          console.log(row);
        },
        querySubmit() {
          console.log('submit!');
        },
        goback:function () {
          this.$router.push("/newtreat")
        }
      }
    }
</script>

<style scoped>

</style>
